<?xml version="1.0" encoding="utf-8"?>
<androidx.cardview.widget.CardView
    android:id="@+id/card"
    app:cardBackgroundColor="@color/md_theme_surfaceContainer"
    xmlns:android="http://schemas.android.com/apk/res/android"
    xmlns:app="http://schemas.android.com/apk/res-auto"
    xmlns:tools="http://schemas.android.com/tools"
    app:cardCornerRadius="@dimen/card_corner_radius"
    android:layout_marginBottom="@dimen/padding_small"
    android:layout_width="match_parent"
    android:layout_height="wrap_content">

    <androidx.constraintlayout.widget.ConstraintLayout
        android:layout_width="match_parent"
        android:layout_height="match_parent"
        android:layout_margin="@dimen/padding_extra_small">

        <TextView
            android:id="@+id/textViewEstablishmentTitle"
            android:layout_width="0dp"
            android:layout_height="wrap_content"
            android:textColor="@color/md_theme_primary"
            android:layout_marginHorizontal="@dimen/padding_small"
            android:layout_marginTop="0dp"
            android:layout_marginBottom="@dimen/padding_extra_small"
            android:textSize="18sp"
            android:textStyle="bold"
            app:layout_constraintEnd_toStartOf="@+id/imgButtonMore"
            app:layout_constraintStart_toStartOf="parent"
            app:layout_constraintTop_toTopOf="parent"
            tools:text="Янки" />

        <ImageButton
            android:id="@+id/imgButtonMore"
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:layout_margin="@dimen/padding_small"
            android:background="@null"
            android:src="@drawable/more"
            app:layout_constraintEnd_toEndOf="parent"
            app:layout_constraintTop_toTopOf="parent" />
        
        <TextView
            android:id="@+id/textViewStartTitle"
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:layout_marginVertical="@dimen/padding_extra_small"
            android:layout_marginHorizontal="@dimen/padding_small"
            android:fontFamily="sans-serif-light"
            android:text="@string/start"
            app:layout_constraintStart_toStartOf="parent"
            app:layout_constraintTop_toBottomOf="@id/textViewEstablishmentTitle" />

        <TextView
            android:id="@+id/textViewStart"
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:layout_margin="@dimen/padding_extra_small"
            app:layout_constraintStart_toEndOf="@id/textViewStartTitle"
            app:layout_constraintTop_toBottomOf="@id/textViewEstablishmentTitle"
            tools:text="11:00" />

        <TextView
            android:id="@+id/textViewEndTitle"
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:layout_marginVertical="@dimen/padding_extra_small"
            android:layout_marginHorizontal="@dimen/padding_small"
            android:fontFamily="sans-serif-light"
            android:text="@string/end"
            app:layout_constraintStart_toEndOf="@id/textViewStart"
            app:layout_constraintTop_toBottomOf="@id/textViewEstablishmentTitle" />

        <TextView
            android:id="@+id/textViewEnd"
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:layout_margin="@dimen/padding_extra_small"
            app:layout_constraintStart_toEndOf="@id/textViewEndTitle"
            app:layout_constraintTop_toBottomOf="@id/textViewEstablishmentTitle"
            tools:text="12:00" />

        <androidx.constraintlayout.widget.Barrier
            android:id="@+id/dateBarrier"
            app:barrierDirection="bottom"
            android:layout_height="wrap_content"
            android:layout_width="0dp"
            app:layout_constraintStart_toStartOf="parent"
            app:layout_constraintEnd_toEndOf="parent"
            app:constraint_referenced_ids="textViewStart, textViewEnd" />
        
        <TextView
            android:id="@+id/textViewStatus"
            android:layout_width="0dp"
            android:layout_height="wrap_content"
            android:layout_marginVertical="@dimen/padding_extra_small"
            android:layout_marginHorizontal="@dimen/padding_small"
            tools:text="@string/status"
            app:layout_constraintStart_toStartOf="parent"
            app:layout_constraintEnd_toEndOf="parent"
            app:layout_constraintTop_toBottomOf="@id/dateBarrier" />


    </androidx.constraintlayout.widget.ConstraintLayout>
</androidx.cardview.widget.CardView>